<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<LINK href="img_files/pop.css" type=text/css rel=stylesheet>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
<meta http-equiv="expires" content="wed, 26 Feb 1997 08:21:57 GMT">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<STYLE type=text/css>BODY {
	FONT: 9pt "宋体", Verdana, Arial, Helvetica, sans-serif
}
A {
	FONT: 9pt "宋体", Verdana, Arial, Helvetica, sans-serif
}
TABLE {
	FONT: 9pt "宋体", Verdana, Arial, Helvetica, sans-serif
}
DIV {
	FONT: 9pt "宋体", Verdana, Arial, Helvetica, sans-serif
}
SPAN {
	FONT: 9pt "宋体", Verdana, Arial, Helvetica, sans-serif
}
TD {
	FONT: 9pt "宋体", Verdana, Arial, Helvetica, sans-serif
}
TH {
	FONT: 9pt "宋体", Verdana, Arial, Helvetica, sans-serif
}
INPUT {
	FONT: 9pt "宋体", Verdana, Arial, Helvetica, sans-serif
}
SELECT {
	FONT: 9pt "宋体", Verdana, Arial, Helvetica, sans-serif
}
BODY {
	PADDING-RIGHT: 5px; PADDING-LEFT: 5px; PADDING-BOTTOM: 5px; PADDING-TOP: 5px
}
</STYLE>

<SCRIPT language=JavaScript>
var parentWin;
var mode;
var ctlType;
var editObj;

function ok() {
	if (ctlName.value=="") {
		alert("请填写标识！");
		return;
	}
	if (ctlTitle.value=="") {
		alert("请填写名称！");
		return;
	}
	if (ctlTitle.value.indexOf(" ")!=-1) {
		alert("名称中不能含有空格！");
		return;
	}

	if (mode=="create") {
		parentWin.CreateTxtCtl(ctlType, ctlName.value, ctlTitle.value, defaultValue.value, fieldType.value, canNull.value, minT.value,minV.value,maxT.value,maxV.value);
	}
	else {
		editObj.name = ctlName.value;
		editObj.title = ctlTitle.value;
		editObj.value = defaultValue.value;
		
		// editObj.canNull = canNull.value;
		editObj.setAttribute("canNull", canNull.value);
		editObj.setAttribute("minT", minT.value);
		editObj.setAttribute("minV", minV.value);
		editObj.setAttribute("maxT", maxT.value);
		editObj.setAttribute("maxV", maxV.value);
	}
	window.close();
}

function window_onload() {
	parentWin =	dialogArguments[0];
	mode = dialogArguments[1];
	if (mode=="create") {
		ctlType = dialogArguments[2];
		if (ctlType=="textarea") {
			fieldType.value = "0";
			fieldType.disabled = true;
		}
	}
	else {
		editObj = dialogArguments[2];
		ctlName.value = editObj.name;
		ctlTitle.value = editObj.title;
		defaultValue.value = editObj.value;
		fieldType.value = editObj.getAttribute("fieldType");		
		if (fieldType.value=="")
			fieldType.value = "0"
		
		fieldType.disabled = true;
		ctlName.disabled = true;
		
		canNull.value = editObj.getAttribute("canNull");
		if (canNull.value=="")
			canNull.value = "1";
		
		minT.value = editObj.getAttribute("minT");
		if (minT.value=="")
			minT.value = "d=";
		
		minV.value = editObj.getAttribute("minV");
		if (minV.value=="undefined")
			minV.value = "";
			
		maxT.value = editObj.getAttribute("maxT");
		if (maxT.value=="")
			maxT.value = "x="
		
		maxV.value = editObj.getAttribute("maxV");
		if (maxV.value=="undefined")
			maxV.value = "";
	}
}
</SCRIPT>
</HEAD>
<BODY bgColor=menu onLoad="window_onload()">
<TABLE width="293" border=0 align=center cellPadding=0 cellSpacing=0>
  <TBODY>
  <TR>
    <TD height="28" align=center>控件字段：</TD>
    <TD height="28" align=left><input name="ctlName" type="text" style="width: 200px; height:22px" maxlength="30"></TD>
  </TR>
  <TR>
<TD width="86" height="28" align=center>控件名称：</TD>
<TD width="207" height="28" align=left><input type="text" name="ctlTitle" style="width: 200px; height:22px"></TD>
  </TR>
  <TR>
    <TD width="86" height="28" align=center>默&nbsp;认&nbsp;值：</TD>
    <TD width="207" height="28" align=left><input type="text" name="defaultValue" style="width: 200px; height:22px"></TD>
  </TR>
  <TR>
    <TD height="28" align=center>数据类型：</TD>
    <TD height="28" align=left>
	<select id="fieldType" name="fieldType">
	<option value="0">字符串型</option>
	<option value="1">文本型</option>
	<option value="2">整型</option>
	<option value="3">长整型</option>
	<option value="4">布尔型</option>
	<option value="5">浮点型</option>
	<option value="6">双精度型</option>
	<option value="7">日期型</option>
	<option value="8">日期时间型</option>
	<option value="9">价格型</option>
	</select>
	</TD>
  </TR>
  <TR>
    <TD height="28" align=center>必&nbsp;填&nbsp;项：</TD>
    <TD height="28" align=left>
	<select id="canNull" name="canNull">
	<option value="1">否</option>
	<option value="0">是</option>
	</select>	</TD>
  </TR>
  <TR>
    <TD height="28" align=center> 长度/大小：</TD>
    <TD height="28" align=left>
	<select name="minT">
	<option value="d=">>=</option>
	<option value="d">></option>
	<option value="=">=</option>
	</select>
	<input name="minV" style="width:40px">
	<select name="maxT">
      <option value="x="><=</option>
      <option value="x"><</option>
    </select>
	<input name="maxV" style="width:40px"></TD>
  </TR>
  
  <TR>
    <TD colspan="2" align=center><input name="submit" type=submit id=Ok onclick="ok()" value=确定>
&nbsp;&nbsp;
<input name="button" type=button onClick=window.close(); value=取消></TD>
  </TR>
</TBODY></TABLE>
</BODY></HTML>
